/*
 * @Author: Robin
 * @Date: 2020/11/6 17:25
 * @LastEditors: Robin
 * @LastEditTime: 2021-03-25 13:55:10
 * @Description: model
 */
package main

type FileSource struct {
	ID         int    `gorm:"primaryKey;column:file_id"`
	CategoryID int    `gorm:"column:category_id"`
	CN         string `gorm:"column:file_cn"`
	EN         string `gorm:"column:file_en"`
	CreatedAt  string `gorm:"column:created_at"`
	UpdatedAt  string `gorm:"column:updated_at"`
}

func (FileSource) TableName() string {
	return "file"
}

type Category struct {
	ID      int    `gorm:"primaryKey;column:category_id"`
	Pid     int    `gorm:"column:pid"`
	TitleCN string `gorm:"column:title_cn"`
	TitleEN string `gorm:"column:title_en"`
	TagCN   string `gorm:"column:tag_cn"`
	TagEN   string `gorm:"column:tag_en"`
	Icon    string `gorm:"column:icon"`
	Type    string `gorm:"column:type"`
	Sort    int    `gorm:"column:sort"`
	PdfCN   string `gorm:"column:pdf_cn"`
	PdfEN   string `gorm:"column:pdf_en"`
	Del     int    `gorm:"column:is_del"`
	Created string `gorm:"column:created_at"`
	Updated string `gorm:"column:updated_at"`
}

func (Category) TableName() string {
	return "category"
}
